<script>
    parent.$.fancybox.close();
</script>
<style type="text/css">
            .box{
                margin: 5px;
                border: 1px solid #60729b;
                padding: 5px;
                width: 500px;
                height: 200px;
                overflow:auto;
                background-color: #e6ebf8;
            }
        </style>
        <script type="text/javascript">
            var newwindow;
            var intId;
            function login() {
                var screenX = typeof window.screenX != 'undefined' ? window.screenX : window.screenLeft,
                        screenY = typeof window.screenY != 'undefined' ? window.screenY : window.screenTop,
                        outerWidth = typeof window.outerWidth != 'undefined' ? window.outerWidth : document.body.clientWidth,
                        outerHeight = typeof window.outerHeight != 'undefined' ? window.outerHeight : (document.body.clientHeight - 22),
                        width = 500,
                        height = 270,
                        left = parseInt(screenX + ((outerWidth - width) / 2), 10),
                        top = parseInt(screenY + ((outerHeight - height) / 2.5), 10),
                        features = (
                        'width=' + width +
                        ',height=' + height +
                        ',left=' + left +
                        ',top=' + top
                        );

                newwindow = window.open('<?php echo $link ?>', 'Login_by_facebook', features);

                if (window.focus) {
                    newwindow.focus()
                }
                return false;
            }

        </script>

        <a href="#" onclick="login();
                return false;">
            <img src="http://static.ak.fbcdn.net/rsrc.php/zB6N8/hash/4li2k73z.gif" border="0">
